<script language="javascript" type="text/javascript">
    function closeGeo(id){
        $("#"+id).slideUp();
    }

</script>


<?php
$rscity= getlimitCity(10);
?>

<div class="project_left">
    <div class="left_box">
        <div class="folder" >
            <div class="folder-title-new00" >
                <div class="square00"></div>
                <div style="margin-top: 7px;float: left"><a>[DỰ ÁN THEO TỈNH THÀNH]</a></div>
            </div>
            <div class="folder-body00">
                <div class="left_project">
                    <ul>
                        <?php
                        while($rs=$db->fetch_array($rscity)) {
                            ?>
                        <li>
                            <a href="<?php echo get_link("projects","cat",$rs['geo_link']);?>">
                                <b><?php echo $rs["geo_title"]?></b>&nbsp;(<?php echo getCountPtojectByCity($rs["geo_id"]); ?>)
                            </a>
                        </li>
                        <?php
                    }
                    ?>
                    </ul>
                    <div style="text-align: left;margin-left: 5px; padding-top: 10px;width:100%;font-size: 12px;font-weight: bold;">
                        <span id="project_leftCityLink"><font color="#000"> [Xem tỉnh khác] </font><img src="/images/arrow6.gif"></span>
                    </div>

                </div>

            </div>
            <div class="folder-bottom00">
                <div class="square-bottom00"></div>
            </div>

        </div>
        <div id="ShowAllCities" style="display:none;">
            <div class="close"><a href="javascript: closeGeo('ShowAllCities');"><img src="/images/close.gif" /></a></div>
            <div class="title_f">- [Toàn Quốc] - </div>
            <div class="content_form">
                <div class="item1">
                    <?php
                    $allCity = getAllCityByParent('1');
                    $i=0;
                    while($row = $db->fetch_array($allCity)){
                        $i++;
                        if($i==1 || $i==2){
                            echo '<a href="'.get_link("projects","cat",$row['geo_link']).'"><b>'.$row['geo_title'].'</b></a><br />';
                        }else{
                            echo '<a href="'.get_link("projects","cat",$row['geo_link']).'">'.$row['geo_title'].'</a><br />';
                        }
                    }
                    ?>
                </div>

                <div class="item1">
                    <?php
                    $allCity = getAllCityByParent('2');
                    $i=0;
                    while($row = $db->fetch_array($allCity)){
                        $i++;
                        if($i==1 || $i==2){
                            echo '<a href="'.get_link("projects","cat",$row['geo_link']).'"><b>'.$row['geo_title'].'</b></a><br />';
                        }else{
                            echo '<a href="'.get_link("projects","cat",$row['geo_link']).'">'.$row['geo_title'].'</a><br />';
                        }
                    }
                    ?>
                </div>

                <div class="item1">
                    <?php
                    $allCity = getAllCityByParent('3');
                    $i=0;
                    while($row = $db->fetch_array($allCity)){
                        $i++;
                        if($i==1 || $i==2){
                            echo '<a href="'.get_link("projects","cat",$row['geo_link']).'"><b>'.$row['geo_title'].'</b></a><br />';
                        }else{
                            echo '<a href="'.get_link("projects","cat",$row['geo_link']).'">'.$row['geo_title'].'</a><br />';
                        }
                    }
                    ?>
                </div>

            </div>
        </div>
        <div class="folder" >
            <div class="folder-title-new00" >
                <div class="square00"></div>
                <div style="margin-top: 7px;float: left"><a>[DỰ ÁN TIÊU BIỂU]</a></div>
            </div>
            <div class="folder-body00">
                <?php $rsFocus=getProject_orderByView();?>
                <div class="left_project">
                    <ul>
                        <?php
                        while($rs=$db->fetch_array($rsFocus)) {
                            ?>
                        <li>
                            <table cellpadding="0px" cellspacing="0px" border="0px" width="100%">
                                <tr>
                                    <td style="width:20%">
                                        <a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>" class="thumb"><img width="47px" height="47px" src="<?php echo get_project_thumb($rs['thumb'],'47-47');?>" /></a>
                                    </td>
                                    <td style="width:70%"><a <a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>" class="thumb">
                                    <b><?php echo $rs["title"]?></b></a></td>
                                </tr>
                            </table>
                        </li>
                        <?php
                    }
                    ?>
                    </ul>
                </div>
            </div>
            <div class="folder-bottom00">
                <div class="square-bottom00"></div>
            </div>


        

        </div>
        <?php  $rsAdv = getAdvClient('projects', 'left', 5);

 if($db->num_rows($rsAdv)>0){
        ?>
    <div class="folder" >
        <div class="folder-title-new00" >
            <div class="square00"></div>
            <div style="margin-top: 7px;float: left;color: #000">[Quảng cáo]</div>
        </div>
        <div class="folder-body00" >
            <?php
            while ($row = $db->fetch_array($rsAdv)) {
                ?>
            <div style="margin-bottom: 2px;">
                <a href="<?php echo $row['link'];?>"><img alt="" src="<?php echo $row['filename'];?>" width="188px;" /></a>
            </div>
            <?php }?>
        </div>
        <div class="folder-bottom00">
            <div class="square-bottom00"></div>
        </div>
    </div>
<?php } ?>
    </div>
</div>